package com.ruoyi.project.meal.service.impl;

import java.util.Date;
import java.util.List;

import com.ruoyi.project.meal.domain.MealWorker;
import com.ruoyi.project.meal.mapper.MealWorkerMapper;
import com.ruoyi.project.meal.service.IMealWorkerService;
import com.ruoyi.project.meal.vo.MealWorkerVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.common.utils.text.Convert;

/**
 * 职工报餐Service业务层处理
 * 
 * @author Sky
 * @date 2024-03-13
 */
@Service
public class MealWorkerServiceImpl implements IMealWorkerService
{
    @Autowired
    private MealWorkerMapper mealWorkerMapper;

    /**
     * 查询职工报餐
     * 
     * @param id 职工报餐ID
     * @return 职工报餐
     */
    @Override
    public MealWorker selectMealWorkerById(Integer id)
    {
        return mealWorkerMapper.selectMealWorkerById(id);
    }

    /**
     * 查询职工报餐列表
     * 
     * @param mealWorker 职工报餐
     * @return 职工报餐
     */
    @Override
    public List<MealWorker> selectMealWorkerList(MealWorker mealWorker)
    {
        return mealWorkerMapper.selectMealWorkerList(mealWorker);
    }

    @Override
    public List<MealWorkerVo> selectWorkerReport(MealWorker mealWorker) {
        return mealWorkerMapper.selectWorkerReport(mealWorker);
    }

    /**
     * 新增职工报餐
     * 
     * @param mealWorker 职工报餐
     * @return 结果
     */
    @Override
    public int insertMealWorker(MealWorker mealWorker)
    {
        return mealWorkerMapper.insertMealWorker(mealWorker);
    }

    /**
     * 修改职工报餐
     * 
     * @param mealWorker 职工报餐
     * @return 结果
     */
    @Override
    public int updateMealWorker(MealWorker mealWorker)
    {
        return mealWorkerMapper.updateMealWorker(mealWorker);
    }

    /**
     * 删除职工报餐对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteMealWorkerByIds(String ids)
    {
        return mealWorkerMapper.deleteMealWorkerByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除职工报餐信息
     * 
     * @param id 职工报餐ID
     * @return 结果
     */
    @Override
    public int deleteMealWorkerById(Integer id)
    {
        return mealWorkerMapper.deleteMealWorkerById(id);
    }
}
